<?php
$this->breadcrumbs=array(
    '更换横幅',
);

echo '当前首页图片缩略图';
if(empty($model->img)) {
    echo CHtml::image(Yii::app()->request->baseUrl."/images/index_02.gif");
} else{
    echo CHtml::image(Yii::app()->request->baseUrl."/images/gallery/thumb_".$model->img);
}

?>


<div class="form">

    <?php $form=$this->beginWidget('CActiveForm', array(
    'id'=>'ads-form',
    'enableAjaxValidation'=>false,
    'htmlOptions'=>array('enctype'=>'multipart/form-data')
)); ?>

    <p class="note"></p>

    <?php echo $form->errorSummary($model); ?>


    <div class="row">
        <?php echo $form->labelEx($model,'图片上传'); ?>
        <input type="file" id="Ads_img" name="Ads_img">    <span class="msg">请上传指定大小的图片（<b style="color: #ff0000;">长*宽：962*130</b>），否则首页头部图标会变形</span>
    </div>

    <div class="row buttons">
        <?php echo CHtml::submitButton($model->isNewRecord ? '更新' : '更新'); ?>
    </div>

    <?php $this->endWidget(); ?>

</div><!-- form -->